<?php
namespace Admin\Controller;

class FeedbackController extends CommonController{

        /*积分商品列表*/
    public function index(){

        $where = array();
        I('get.keywords') && $where['content'] = array('like','%'.I('get.keywords').'%');
        $dataPage = D('Feedback')->relation(true)->getPager($where);
        $this->assign('list',$dataPage['data']);
        $this->assign('page',$dataPage['page']);
        $this->display();
    }

    public function save(){

        !I('id') && $this->error('id不存在'); 
        $info = D('Feedback')->where(array('id'=>I('id')))->relation(true)->find();
        $info['pics'] = explode(',', $info['pics']);
        $this->assign('info',$info);
        $this->display();
    }

       /*下载二维码*/
    public function down_ewm() {
        $filename = $_SERVER['DOCUMENT_ROOT'].I('ewm_path');
        header('Content-Type:image/jpg'); //指定下载文件类型
        header('Content-Disposition: attachment; filename="' . basename($filename) . '"'); //指定下载文件的描述
        header('Content-Length:' . filesize($filename)); //指定下载文件的大小
        readfile($filename);
    }

   
}
?>